//
//  XLGSendQueueDBOperation.h
//  etionCBLogic
//
//  Created by wjxfhxy on 15-2-11.
//  Copyright 2015 GuangZhouXuanWu. All rights reserved.
//

#import <Foundation/Foundation.h>

#import "XLGSendQueueIndex.h"

#import "XMSSQLiteHelper.h"

//typedef enum
//{
//	EWatingSendIndexTypeSHEETKV,
//	EWatingSendIndexTypeBUSINESS,
//    EWatingSendIndexTypeLOCALDS,
//	EWatingSendIndexTypeOTHER
//}EWatingSendIndexType;

@interface XLGSendQueueDBOperation : NSObject

- (id)initWithTablePath:(NSString*)tablePath;

- (NSInteger)addSendQueueIndex:(XLGSendQueueIndex *)mi;

- (void)getSendQueueIndexCompletion:(void(^)(NSInteger nResult, NSArray *index))completion;

- (void)getFinishSendIndexCompletion:(void(^)(NSInteger nResult, NSArray *index))completion;

- (void)getFinishSendIndex:(NSString*(^)(NSString *condition))condition completion:(void(^)(NSInteger nResult, NSArray *index))completion;

- (NSInteger)modifySendedSendIndex:(NSString*)extendID;

- (NSInteger)modifySendIndexSerialNo:(NSInteger(^)(NSInteger(^modify)(NSUInteger serialNo,NSString *extendID)))block;

- (NSInteger)modifySendIndexStatus:(NSInteger(^)(NSInteger(^modify)(NSUInteger serialNo,NSString *extendID,NSUInteger sendStatus)))block;

- (NSInteger)deleteSendIndexWithExtendID:(NSArray*)extendIDs;

- (NSInteger)deleteFinishSendIndex;

- (NSInteger)deleteFinishSendIndex:(NSString*(^)(NSString *condition))condition;

@end